package com.Controller;
import com.Service.ExamineService;
import com.pojo.AuthorApply;
import com.pojo.BookExamine;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/examine")
public class ExamineController {
    @Autowired
    private ExamineService service;
    @GetMapping("/getInfo")
    @ResponseBody
    public Map<String,Object> getAuthorApplyInfo(int page,int rows) throws SQLException {
        return service.getApplyInfo(page,rows);
    }
    @PostMapping("/deleteInfo")
    @ResponseBody
    public void deleteAuthorApplyInfo(@RequestParam String id ,@RequestParam int status) throws SQLException {
       service.deleteAuthorApply(id,status);
    }
    @GetMapping("/getApplyBook")
    @ResponseBody
    public Map<String,Object> getBookApply(int page,int rows) throws SQLException {
       return service.getApplyBook(page,rows);
    }
}
